'use strict';

define(['jquery', 'lib/perfect-scrollbar/perfect-scrollbar-0.4.5.with-mousewheel.min'], function($) {
	return {

		updateScrollpane : function() {
			$('.scroll-pane').each(function() {
				var scrollTop = 0;
				var scrollbarXBottom = parseInt($('ps-scrollbar-x-rail').css('bottom'), 0)
        		$(this).scrollTop(scrollTop);
        		$('ps-scrollbar-x-rail').css({bottom: scrollbarXBottom - scrollTop});
			});			
		}
	}
});
